<template>
	<view class="nav">
		<view class="navbtn" @click="gopage('/pages/newpages/shopHome')">
			<image src="../static/img/tabBar/home.png" mode=""></image>
			<text>商城首页</text>
		</view>
		<view class="navbtn" @click="gopage('/pages/newpages/category')">
			<image src="../static/img/tabBar/home.png" mode=""></image>
			<text>分类</text>
		</view>
		<view class="navbtn backhome" @click="gopage('back')">
			<view class="borr">
				<text>返回</text>
				<text>大厅</text>
			</view>
		</view>
		<view class="navbtn" @click="gopage('/pages/shop/shopcar')">
			<image src="../static/img/tabBar/home.png" mode=""></image>
			<text>购物车</text>
		</view>
		<view class="navbtn" @click="gopage('user')">
			<image src="../static/img/tabBar/home.png" mode=""></image>
			<text>我的</text>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			url:''
		},
		data() {
			return {}
		},
		methods:{
			gopage(url){
				if(url=='back'){
					uni.switchTab({
						url:'/pages/newpages/home'
					})
				}if(url=='user'){
					uni.switchTab({
						url:'/pages/Businesscenter'
					})
				}else if(url!=this.url){
					uni.reLaunch({
						url:url
					})
				}
			}
		}
		
	}
</script>

<style>
	.nav{position:fixed;bottom:0;z-index: 9999;height:88upx;padding:12upx;text-align: center;background:#FFFFFF;width: 100%;display:flex;}
	.navbtn{flex: 1;}
	.navbtn image{height:50upx;width:50upx;display:block;margin: 0 auto;}
	.borr{
		height:60upx;width:60upx;display:block;margin: 0 auto;
		border-radius:50%;
		color:#FFFFFF;
		background: #F5574E;
		line-height: 1.4;
		font-size:22rpx;
		border:10upx solid #F5574E;
	}
	.borr text{display:block;}
</style>
